import requests
import json
from pprint import pprint

url = "https://bd-inner.amh-group.com/cangjie_gateway/cargo_name_identify"
def get_new_result(cargo_name,url):

    post_body = {
   "cargoName": "扒渣机",
 }
    headers = {
        'Content-Type':"application/json"
    }

    req = requests.post(url,data=json.dumps(post_body),headers=headers)
    return req.json()

if __name__ == '__main__':
    test_cast= [
        # "我想云木方",
        # "方木",
        #"木方方料",
        "200",
        # "木条",
        # "木方",
        #
        # "方木木方",
        # "木方",
        # "木材方料",
    ]

    while 1:
        pprint(get_new_result(test_cast[0],url))